package indi.zhifa.recipe.bailan.framework.auth.util.impl;

import indi.zhifa.recipe.bailan.framework.auth.entity.BaseTokenObject;

import indi.zhifa.recipe.bailan.framework.auth.entity.dto.TokenObject;
import indi.zhifa.recipe.bailan.framework.auth.property.TokenConfig;
import indi.zhifa.recipe.bailan.framework.auth.util.ITokenUtil;
import org.springframework.stereotype.Component;

@Component
public class TokenUtilImpl extends BaseTokenUtilImpl implements ITokenUtil {

    public TokenUtilImpl(TokenConfig pTokenConfig){
        super(pTokenConfig);
    }

    @Override
    public BaseTokenObject createTokenObject() {
        return new TokenObject();
    }

    @Override
    public TokenObject getTokenObject() {
        return super.getTokenObject(TokenObject.class);
    }

    @Override
    public BaseTokenObject parseToken(String pToken) {
        TokenObject tokenObject = parseToken(pToken,TokenObject.class);
        return tokenObject;
    }

}
